-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[metal] Pull out the Runtime MSL code into its own module #3086
Conversation
✔️ Deploy Preview for jovial-fermat-aa59dc canceled. 🔨 Explore the source changes: c5d7f44 🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/615abcea147626000857b119 |
/format |
emit(" ListManagerData snode_lists[{}];", max_snodes_); | ||
emit(" NodeManagerData snode_allocators[{}];", max_snodes_); | ||
emit(" NodeManagerData::ElemIndex ambient_indices[{}];", max_snodes_); | ||
emit(" SNodeMeta snode_metas[{}];", kMaxNumSNodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How big is kMaxNumSNodes? Will it be a concern in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! This is 1024 now
Line 12 in fce9108
constexpr int taichi_max_num_snodes = 1024; |
Unfortunately the sparse runtime part cannot be easily separated into a per-root buffer yet, so all the sparse info (for multiple roots) still share a single global buffer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with this backend but looks good to me
Related issue = #3018
Decoupling the runtime part from the root/SNodes, so that it is easier for us to support multiple SNode roots.
In prep for the multi-root setup, we cannot know how many SNodes there will be in the system. As a result, we just set a reasonable upper-bound of 1024:
taichi/taichi/inc/constants.h
Line 12 in fce9108
Unfortunately the sparse runtime part cannot be easily separated into a per-root buffer yet, so all the sparse info (for multiple roots) still share a single global buffer.